package cn.lzm.controller;

import cn.lzm.domain.User;
import cn.lzm.feignclient.UserFeignClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

@RestController
@RequestMapping("/pay")
public class PayController {
    @Autowired
    private UserFeignClient userFeignClient;
    @GetMapping("/getUserById/{id}")
    public User getUserById(@PathVariable("id") Long id ){
        User user = userFeignClient.getUserById(id);
        return user;
    }
}
